<template>
	<view class="container">
		<view class="AvatarBody">
			<view class="AvatarImgBg">
				<image class="AvatarImg" :src="AvatarImg"></image>
			</view>
		</view>

		<view class="StuMsgBg">
			<view class="StuMsgTitleBg">
				<text class="StuMsgTitle" @click="CheckInfo()">
					<template >{{ChenckInfo}}</template>
					</text>
			</view>
			<view class="StuMsgBody">
				<text class="StuMsgAttr">姓名：<text>{{(IsChenck)?AdminInfo.realName:"*"}}</text></text>
				<text class="StuMsgAttr">邮箱：<text>{{(IsChenck)?AdminInfo.email:"*"}}</text></text>
				<text class="StuMsgAttr">↓↓↓负责的流程↓↓↓</text></text>
			</view>
            <view v-for="item in PowerList" :key="item.id">
				<text class="StuMsgAttr">
					<text>{{item.procName}}</text>
				</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				AvatarImg: "../../static/icon/PersonCenter.png",
				IsChenck: false,
				ChenckInfo:"查看个人信息",
				AdminInfo: null,
				PowerList: null
			}
		},
		onLoad() {
			this.getStudentData();
		},
		methods: {
			// 获取页面数据
			getStudentData() {
				var Admindata = uni.getStorageSync('admin');
				console.log(Admindata);
				this.AdminInfo=Admindata.admin;
				this.PowerList = Admindata.canProcessList;
				console.log(this.PowerList);
			},
			CheckInfo() {
				if(this.IsChenck){
					this.IsChenck=false,
					this.ChenckInfo="查看个人信息"
				}else{
					this.IsChenck=true;
					this.ChenckInfo="隐藏个人信息"}
				console.log(this.IsChenck);
			}
		},
	}
</script>

<style>
	.container {
		text-align: left;
	}

	.AvatarBody {
		height: 20vh;
		width: 40vw;
		margin: 1vh auto;
	}

	.AvatarImgBg {
		height: 20vh;
		width: 40vw;
		box-shadow: 2rpx 2rpx 10rpx #007AFF;
		/* background-color: #007AFF; */
		border: 5rpx solid #007AFF;
		border-radius: 100%;
		overflow: hidden;
	}

	.AvatarImg {
		height: 100%;
		width: 100%;
	}

	.StuMsgBg {
		position: absolute;
		line-height: 8vh;
		height: auto;
		width: 90vw;
		left: 5vw;
		top: 22vh;
		background-color: #FFFFFF;
		border-radius: 20rpx;
		box-shadow: 2rpx 2rpx 10rpx #27347d;
	}


	.StuMsgTitle {
		display: block;
		color: white;
		background: #fdbb59;
		padding: 0.2rem;
		font-size: 0.7rem;
		height: 5vh;
		line-height: 5vh;
		width: 20vw;
		border-radius: 1vw;
		margin: 1vh auto;
		box-shadow: 2rpx 2rpx 10rpx #d49b4b;
	}

	.StuMsgBody {}

	.StuMsgAttr {
		margin-left: 10vw;
		float: left;
		width: 70vw;
		height: 7vh;
	}
</style>
